import { AxiosAccount } from '../utils/http/request';

//商品分类管理
enum categoryApi {
  list = '/store-back/goods/category/list',
  all = '/store-back/goods/category/all',
  add = '/store-back/goods/category/add',
  edit = '/store-back/goods/category/edit',
  delete = '/store-back/goods/category/delete',
}
//商品类型
enum goodsTypeApi {
  list = '/store-back/goods/goods-type/list',
  all = '/store-back/goods/goods-type/all',
  add = '/store-back/goods/goods-type/add',
  edit = '/store-back/goods/goods-type/edit',
  delete = '/store-back/goods/goods-type/delete',
}
//商品标签
enum goodsTagApi {
  list = '/store-back/goods/goods-tag/list',
  all = '/store-back/goods/goods-tag/all',
  add = '/store-back/goods/goods-tag/add',
  edit = '/store-back/goods/goods-tag/edit',
  delete = '/store-back/goods/goods-tag/delete',
}
//商品属性
enum goodsAttributeApi {
  list = '/store-back/goods/goods-attribute/list',
  all = '/store-back/goods/goods-attribute/all',
  add = '/store-back/goods/goods-attribute/add',
  edit = '/store-back/goods/goods-attribute/edit',
  delete = '/store-back/goods/goods-attribute/delete',
}

//商品属性
enum expressTemplateApi {
  list = '/store-back/goods/express-template/list',
  all = '/store-back/goods/express-template/all',
  add = '/store-back/goods/express-template/add',
  edit = '/store-back/goods/express-template/edit',
  delete = '/store-back/goods/express-template/delete',
}

//品牌管理
enum brandApi {
  list = '/store-back/goods/brand/list',
  add = '/store-back/goods/brand/add',
  edit = '/store-back/goods/brand/edit',
  delete = '/store-back/goods/brand/delete',
}

//商品列表
enum listApi {
  list = '/store-back/goods/goods/list',
  add = '/store-back/goods/goods/add',
  edit = '/store-back/goods/goods/edit',
  delete = '/store-back/goods/goods/delete',
  audit = '/store-back/goods/goods/audit',
}

//商品分类列表
export const categoryList = (data?: any) =>
  AxiosAccount.request({
    url: categoryApi.list,
    method: 'post',
    data: data,
  });

//商品分类列表
export const categoryAll = () =>
  AxiosAccount.request({
    url: categoryApi.all,
    method: 'post',
  });

//添加商品分类
export const categoryAdd = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.add,
    method: 'post',
    data,
  });

//修改商品分类
export const categoryEdit = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.edit,
    method: 'post',
    data,
  });

//删除商品分类
export const categoryDelete = (data: any) =>
  AxiosAccount.request({
    url: categoryApi.delete,
    method: 'post',
    data,
  });

//商品类型列表
export const goodsTypeList = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.list,
    method: 'post',
    data,
  });

//商品类型列表
export const goodsTypeAll = () =>
  AxiosAccount.request({
    url: goodsTypeApi.all,
    method: 'post',
  });

//添加商品类型
export const goodsTypeAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.add,
    method: 'post',
    data,
  });

//修改商品类型
export const goodsTypeEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.edit,
    method: 'post',
    data,
  });

//删除商品类型
export const goodsTypeDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsTypeApi.delete,
    method: 'post',
    data,
  });

//快递模板列表
export const expressTemplateList = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.list,
    method: 'post',
    data,
  });

//商品类型列表
export const expressTemplateAll = () =>
  AxiosAccount.request({
    url: expressTemplateApi.all,
    method: 'post',
  });

//添加商品类型
export const expressTemplateAdd = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.add,
    method: 'post',
    data,
  });

//修改商品类型
export const expressTemplateEdit = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.edit,
    method: 'post',
    data,
  });

//删除商品类型
export const expressTemplateDelete = (data: any) =>
  AxiosAccount.request({
    url: expressTemplateApi.delete,
    method: 'post',
    data,
  });

//商品标签列表
export const goodsTagList = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.list,
    method: 'post',
    data,
  });

//所有商品标签
export const goodsTagAll = () =>
  AxiosAccount.request({
    url: goodsTagApi.all,
    method: 'post',
  });

//添加商品标签
export const goodsTagAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.add,
    method: 'post',
    data,
  });

//修改商品标签
export const goodsTagEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.edit,
    method: 'post',
    data,
  });

//删除商品标签
export const goodsTagDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsTagApi.delete,
    method: 'post',
    data,
  });

//商品属性列表
export const goodsAttributeList = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.list,
    method: 'post',
    data,
  });

//所有商品属性
export const goodsAttributeAll = () =>
  AxiosAccount.request({
    url: goodsAttributeApi.all,
    method: 'post',
  });

//添加商品属性
export const goodsAttributeAdd = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.add,
    method: 'post',
    data,
  });

//修改商品属性
export const goodsAttributeEdit = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.edit,
    method: 'post',
    data,
  });

//删除商品属性
export const goodsAttributeDelete = (data: any) =>
  AxiosAccount.request({
    url: goodsAttributeApi.delete,
    method: 'post',
    data,
  });

//品牌列表
export const brandList = (data?: any) =>
  AxiosAccount.request({
    url: brandApi.list,
    method: 'post',
    data,
  });

//添加品牌
export const brandAdd = (data: any) =>
  AxiosAccount.request({
    url: brandApi.add,
    method: 'post',
    data,
  });

//修改品牌
export const brandEdit = (data: any) =>
  AxiosAccount.request({
    url: brandApi.edit,
    method: 'post',
    data,
  });

//删除品牌
export const brandDelete = (data: any) =>
  AxiosAccount.request({
    url: brandApi.delete,
    method: 'post',
    data,
  });

//商品列表
export const goodsList = (data: any) =>
  AxiosAccount.request({
    url: listApi.list,
    method: 'post',
    data,
  });

//添加商品
export const goodsAdd = (data: any) =>
  AxiosAccount.request({
    url: listApi.add,
    method: 'post',
    data,
  });

//修改商品分类
export const goodsEdit = (data: any) =>
  AxiosAccount.request({
    url: listApi.edit,
    method: 'post',
    data,
  });

//删除商品
export const goodsDelete = (data: any) =>
  AxiosAccount.request({
    url: listApi.delete,
    method: 'post',
    data,
  });

//审核商品
export const goodsAudit = (data: any) =>
  AxiosAccount.request({
    url: listApi.audit,
    method: 'post',
    data,
  });
